package com.cd.blog.mapper;

import com.cd.blog.pojo.Article;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper {

    @Select("SELECT * from t_article")
    List<Article> getAll();

    @Select("SELECT * from t_article ta where ta.` id` =#{id}")
    Article getOne(Integer id);
}
